package es.ignapziriza.ccrypto.testing;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import es.ignapziriza.ccrypto.ciphers.transposition.ScytaleCipher;

public class ScytaleCipherTesting {
	private ScytaleCipher scytale;

	@Before
	public void setUp() throws Exception {
		scytale = new ScytaleCipher();
	}

	@After
	public void tearDown() throws Exception {
		scytale = null;
	}

	@Test
	public void testCipher() {
		scytale.cipher("HELPMEIAMUNDERATTACK");
		assertEquals("HENTEIDTLAEAPMRCMUAK", scytale.getCipheredText());
	}

	@Test
	public void testDecipher() {
		scytale.decipher("HENTEIDTLAEAPMRCMUAK");
		assertEquals("HELPMEIAMUNDERATTACK", scytale.getCipheredText());

	}

}
